const webpack = require("webpack");
module.exports={
    devServer:{
        host:"0.0.0.0",
        port:8081,
        proxy:{
           
            "/act":{
                target:"https://u.y.qq.com",
                changeOrigin:true,
                pathRewrite:{
                    "/act":""
                }
            },
            "/apis":{
                ws: true,
                target:"https://c.y.qq.com",
                changeOrigin:true,
                pathRewrite:{
                    "^/apis":""
                }
            },
            "/music":{
                target:"https://isure.stream.qqmusic.qq.com",
                changeOrigin:true,
                pathRewrite:{
                    "/music":""
                }
            },
            "/blog":{
                target:"http://localhost:8082",
                changeOrigin:true,
                pathRewrite:{
                    "/blog":""
                }
            },
            "/photos":{
                target:"http://cdn.apc.360.cn",
                changeOrigin:true,
                pathRewrite:{
                    "/photos":""
                }
            },
            "/message":{
                ws: true,
                target:"http://wallpaper.apc.360.cn",
                changeOrigin:true,
                pathRewrite:{
                    "^/message":""
                }
            }
           
        
        },
        disableHostCheck: true
    },
    configureWebpack: {

        plugins: [
    
          new webpack.ProvidePlugin({
    
            $: 'jquery',
    
            jQuery: 'jquery',
    
            'window.jQuery': 'jquery',
    
            Popper: ['popper.js', 'default']
    
          })
    
        ]
    
      }

     
}